from django.db import models
from user.models import UserProfile
from column.models import Column
from video.models import Videos


# Create your models here.
class VideosReviewing(models.Model):
    vid = models.BigAutoField(primary_key=True)
    video = models.ForeignKey(Videos, on_delete=models.CASCADE, related_name='reviewing_video')
    file_path = models.CharField(max_length=200, null=False, blank=False)
    duration = models.FloatField(null=False, blank=False)
    title = models.CharField(max_length=50, null=False, blank=False)
    cover_path = models.CharField(max_length=200, null=False, blank=False)
    tags = models.CharField(max_length=100, null=False, blank=False)
    type = models.CharField(max_length=50, null=False, blank=False)
    description = models.TextField(null=False, blank=False)
    update_time = models.DateTimeField(auto_now=True,null=False, blank=False)
    status = models.BooleanField(null=True, blank=True)
    mup = models.ForeignKey(UserProfile, on_delete=models.CASCADE, related_name='mup_video_review')
    column = models.ForeignKey(Column, on_delete=models.CASCADE, related_name='column_video_review', blank=True, null=True)
    
